import 'package:efood_multivendor/util/dimensions.dart';
import 'package:efood_multivendor/util/styles.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../data/model/response/product_model.dart';

class NotAvailableWidget extends StatelessWidget {
  final double fontSize;
  final bool isRestaurant;
  final bool isTooFar;

  NotAvailableWidget(
      {this.fontSize = 8, this.isRestaurant = false, this.isTooFar = false,});

  @override
  Widget build(BuildContext context) {
    return Positioned(
      top: 0,
      left: 0,
      bottom: 0,
      right: 0,
      child: Container(
        alignment: Alignment.center,
        decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(Dimensions.RADIUS_SMALL),
            color: Colors.black.withOpacity(0.6)),
        child: Text(
          isRestaurant
              ? isTooFar
                  ? 'distance_too_long'.tr
                  : 'closed_now'.tr
                  
              : isTooFar?'distance_too_long'.tr:'not_available_now_break'.tr,
          textAlign: TextAlign.center,
          style: sfRegular.copyWith(color: Colors.white, fontSize: fontSize),
        ),
      ),
    );
  }
}
